Do we understand inbreeding? A commentary on Clo et al. 2025

Load packages and helper functions

Code
library(tidyverse)
library(kableExtra)
library(DT)

# Create a function to build HTML searchable tables

my_data_table <- function(df){
  datatable(
    df, rownames=FALSE,
    autoHideNavigation = TRUE,
    extensions = c("Scroller",  "Buttons"),
    options = list(
      autoWidth = TRUE,
      dom = 'Bfrtip',
      deferRender=TRUE,
      scrollX=TRUE, scrollY=1000,
      scrollCollapse=TRUE,
      buttons =
        list('pageLength', 'colvis', 'csv', list(
          extend = 'pdf',
          pageSize = 'A4',
          orientation = 'landscape',
          filename = 'inbreeding_studies')),
      pageLength = 100
    )
  )
}

The dataset

Load and display the complete dataset.

Code
data <- 
  read_delim("inbreeding_adaptive_refs.csv") %>% 
  select(-Comment) %>% 
  rename(`Automatic transmission advantage mentioned?` = Automatic_transmission_advantage_mentioned,
         Title = Article_Title,
         Journal = Source_Title,
         Year = Publication_Year,
         Relevance = Relevant,
         Type = Article_Type,
         `Publication format` = `Publication Type`,
         `Null hypothesis` = Null_expectation) %>% 
  mutate(`Null hypothesis` = case_when(`Null hypothesis` == "Bad" ~ "Inbreeding avoidance",
                                       `Null hypothesis` == "Good" ~ "Inbreeding preference/tolerance",
                                       .default = `Null hypothesis`))

my_data_table(data %>% select(Authors, Title, Journal, Year, `Null hypothesis`, `Automatic transmission advantage mentioned?`, Taxa, Type, Relevance, Taxa, Accessed, `Publication format`))

Column explanations

  • Authors: authors listed on publication

  • Title: publication title

  • Journal: journal where study is published

  • Year: year study was published

  • Null hypothesis: did the authors expect inbreeding preference, tolerance or avoidance to be present in their system. ‘No evolutionary statement’ indicates that they did not posit an evolutionary hypothesis regarding the presence or absence of inbreeding.

  • Automatic transmission advantage mentioned: did the authors, whether by name or description, mention the automatic transmission advantage when making their evolutionary argument about inbreeding.

  • Taxa: animal or plant.

  • Type: was the study Empirical, a review, a meta-analysis or theoretical?

  • Relevance: how central was inbreeding to the studies research question. 0 = not relevant, 1 = not central or 2 = central, or they clearly stated a evolutionary hypothesis about inbreeding in their system.

  • Accessed: 1 = we found the full text, 0 = we did not.

  • Publication format: J = journal article, B = book chapter.

Clean the dataset and display data used for analysis

Code
analysis_data <- 
  data %>% 
  filter(Accessed == 1, # remove studies we couldn't access (also inlcudes the book chapter)
         Relevance == 2, # scored 0, 1, 2, only include 2s
         `Null hypothesis` != "No evolutionary statement", # remove studies that mention inbreeding, but make no clear evolutionary prediction relating to it
        Taxa == "Animal") %>%
  select(Authors, Title, Journal, Year, `Null hypothesis`, `Automatic transmission advantage mentioned?`, Taxa, Type, Relevance, Taxa, Accessed, `Publication format`)

Show the studies selected for analysis

Code
my_data_table(analysis_data)

Visualise the data

Code
analysis_data %>%
  group_by(`Automatic transmission advantage mentioned?`, 
           `Null hypothesis`) %>% 
  summarise(Studies = n()) %>% 
  knitr::kable(digits = 1, align = "lccc", position = "c") %>%
  kable_styling("striped") 
Automatic transmission advantage mentioned? Null hypothesis Studies
NO Inbreeding avoidance 53
NO Inbreeding preference/tolerance 1
NO None 6
YES Inbreeding avoidance 9
YES Inbreeding preference/tolerance 3
YES None 6

Test whether mentioning the ATA changes the ‘gist’

Using a Fisher’s exact test, we test if there is a relationship between mentioning the ATA and whether inbreeding avoidance is the null expectation.

Code
analysis_data_for_test <-
  analysis_data %>% 
  mutate(Hypothesis = case_when(
    `Null hypothesis` == "Inbreeding avoidance" ~ 1,
    `Null hypothesis` != "Inbreeding avoidance" ~ 0)) %>% 
  rename(ATA = `Automatic transmission advantage mentioned?`)

test <- fisher.test(table(analysis_data_for_test$ATA, analysis_data_for_test$Hypothesis))

test

    Fisher's Exact Test for Count Data

data:  table(analysis_data_for_test$ATA, analysis_data_for_test$Hypothesis)
p-value = 0.00123
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.03309415 0.52695725
sample estimates:
odds ratio 
 0.1369227